<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>课程列表</title>
    <link rel="stylesheet" th:href="@{/client/css/list.css}"/>
    <script th:src="@{/client/lib/jquery/jquery-3.7.1.min.js}"></script>
    <script th:inline="javascript">
        let ctx = /*[[@{/}]]*/"";
        if (ctx.endsWith("/")) {
            ctx = ctx.substring(0, ctx.length - 1);
        }
    </script>

    <script th:src="@{/client/js/list.js}"></script>
</head>
<body>
<div class="main">
    <ul>
        <li th:each="c:${schedule}" th:attr="id=${c.scheduleId}">
            <div class="name">
                <h2 th:text="${c.name}"></h2>
                <span th:text="${c.department}"></span>
                <span th:text="${c.recomm}"></span>
                <span>所剩号源</span>
                <span th:text="${c.availableSlots}"></span>

            </div>
            <div class="action">
                <p th:text="${#dates.format(c.startTime, 'yyyy-MM-dd HH:mm')}"></p>
                <p>-</p>
                <p th:text="${#dates.format(c.endTime, 'yyyy-MM-dd HH:mm')}"></p>
                <button class="book" type="button">预约</button>
            </div>
        </li>
    </ul>
</div>
</body>
</html>